package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.pojo.exceptional.CdzExceptionalRetroaction;
import com.zhentao.service.CdzExceptionalRetroactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/exceptional")
public class ExceptionalController {
    @Autowired
    private CdzExceptionalRetroactionService cdzExceptionalRetroactionService;
    @PostMapping("/add")
    public ResponseResult add(@RequestBody CdzExceptionalRetroaction cdzExceptionalRetroaction) {
        return cdzExceptionalRetroactionService.add(cdzExceptionalRetroaction);
    }

    @GetMapping("/list")
    public ResponseResult list() {
        return cdzExceptionalRetroactionService.select();
    }
}
